////////////////////////////////////
// RegionCreator				  //
// by Rutger Storm                //
//                                //
// File: RegionCreatorWindow.h  // 
// Desc: Definition of the        //
//			PortScannerWindow     //
//			class.				  //
////////////////////////////////////
#ifndef _REGIONCREATORWINDOW_H_
#define _REGIONCREATORWINDOW_H_

#include "Main.h"
#include "Win32WrapperClass.h"

class RegionCreatorWindow: public Win32WrapperClass {
public:
	RegionCreatorWindow(char *ClassName, char *WindowTitle, DWORD dwStyles, RECT *rect, HINSTANCE hInstance);
	virtual ~RegionCreatorWindow();

	LRESULT CALLBACK WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	void BuildGUI();
	BOOL validateInput();
	BOOL makeRegion();
	HRGN ScanRegion(HBITMAP pBitmap, BYTE jTranspR, BYTE jTranspG, BYTE jTranspB);
	BOOL SaveRegion(HRGN hRgn, char *szFile);
	BYTE* Get24BitPixels(HBITMAP pBitmap, WORD *pwWidth, WORD *pwHeight);


protected:
	HWND m_hGoButton;
	HWND m_hOpenButton;
	HWND m_hRedColorEdit;
	HWND m_hGreenColorEdit;
	HWND m_hBlueColorEdit;
	HWND m_hPathEdit;
	HWND m_hRedColorLabel;
	HWND m_hGreenColorLabel;
	HWND m_hBlueColorLabel;
	HWND m_hDisplayArea;

	BOOL DoFileOpen();
};

#endif // _REGIONCREATORWINDOW_H_